Reuse, Don't Recycle: Transforming Lock-Free Algorithms That Throw Away Descriptors

نویسندگان

  • Maya Arbel-Raviv
  • Trevor Brown
چکیده

In many lock-free algorithms, threads help one another, and each operation creates a descriptor that describes how other threads should help it. Allocating and reclaiming descriptors introduces significant space and time overhead. We introduce the first descriptor abstract data type (ADT), which captures the usage of descriptors by lock-free algorithms. We then develop a weak descriptor ADT which has weaker semantics, but can be implemented significantly more efficiently. We show how a large class of lock-free algorithms can be transformed to use weak descriptors, and demonstrate our technique by transforming several algorithms, including the leading k-compare-and-swap (k-CAS) algorithm. The original k-CAS algorithm allocates at least k + 1 new descriptors per k-CAS. In contrast, our implementation allocates two descriptors per process, and each process simply reuses its two descriptors. Experiments on a variety of workloads show significant performance improvements over implementations that reclaim descriptors, and reductions of up to three orders of magnitude in peak memory usage. 1998 ACM Subject Classification D.1.3 [Programming Techniques]: Concurrent Programming

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The recycling solution: how I increased recycling on dilworth road.

When we throw out our trash it is burned in an incinerator or buried in a landfill. If we burn our trash, it pollutes the air. If we bury it, it fills up our landfills and gets out of hand. But ifwe recycle things, it will not pollute anything and we can use it over again. By recycling we also save money. Our county has a recycling program. Every Friday, you have a chance to put out your trash ...

متن کامل

Correction of a Memory Management Method for Lock-Free Data Structures

Memory reuse in link-based lock-free data structures requires special care. Many lock-free algorithms require deleted nodes not to be reused until no active pointers point to them. Also, most lock-free algorithms use the compare and swap atomic primitive, which can suffer from the “ABA problem” [1] associated with memory reuse. Valois [3] proposed a memory management method for link-based data ...

متن کامل

Practical and Efficient Lock-Free Garbage Collection Based on Reference Counting

We present an efficient and practical lock-free implementation of a garbage collection scheme based on reference counting aimed for the use with arbitrary lock-free dynamic data structures. The scheme guarantees the safety of local as well as global references, supports arbitrary memory reuse, uses atomic primitives which are available in modern computer systems and provides an upper bound on t...

متن کامل

Techniques for Constructing Efficient Lock-free Data Structures

Techniques for Constructing Efficient Lock-free Data Structures Trevor Brown Doctor of Philosophy Graduate Department of Computer Science University of Toronto 2017 Building a library of concurrent data structures is an essential way to simplify the difficult task of developing concurrent software. Lock-free data structures, in which processes can help one another to complete operations, offer ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017